#pragma once

#define WIN32_LEAN_AND_MEAN
#include <Windows.h>

class CSGD_Direct3D;
class CSGD_DirectInput;
class CSGD_TextureManager;
class CSGD_XAudio2;
class CSGD_MessageSystem;
class CSGD_EventSystem;
class IMessage;
class CPlayer;
class CEntity;
class CEntityManager;

class IGameState;

class CGame
{
public:	
	static CGame* GetInstance( void );
	static void DeleteInstance( void );

	void Initialize( HWND hWnd, HINSTANCE hInstance, int nWidth, int nHeight, bool bIsWindowed );
	bool Main( void );
	void Terminate( void );
	int GetScreenWidth( void ) const;	
	int GetScreenHeight( void ) const;	
	bool GetIsWindowed( void ) const;	
	void ToggleIsWindowed( void );		
	void ChangeState( IGameState* pState );

private:
	static CGame* s_pInstance;

	CGame( void );						
	~CGame( void );						
	CGame( const CGame& );				
	CGame& operator= ( const CGame& );	

	bool Input( void );
	void Update( void );
	void Render( void );

	CSGD_Direct3D*			m_pD3D;
	CSGD_DirectInput*		m_pDI;
	CSGD_TextureManager*	m_pTM;
	CSGD_XAudio2*			m_pXA;

	int						m_nScreenWidth;
	int						m_nScreenHeight;
	bool					m_bIsWindowed;
	IGameState*				m_pCurrState;
	DWORD					m_dwCurrTime;
};